package com.itheima.stock.controller;

import com.itheima.stock.api.StockTaskAPI;
import com.itheima.stock.response.ResponseResult;
import com.itheima.stock.service.StockTimerService;
import com.itheima.stock.service.impl.StockTimerServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zxh
 * @created 2024/12/25 19:24
 * @description
 */
@RestController
public class StockTask implements StockTaskAPI {
    private final StockTimerService service;

    public StockTask(StockTimerService service) {
        this.service = service;
    }

    @Override
    public ResponseResult<?> getStockInfo(String biz) {
        service.getStockInfo(biz);
        return ResponseResult.ok();
    }

    @Override
    public ResponseResult<?> getStockBlockInfo() {
        service.getStockBlockInfo();
        return ResponseResult.ok();
    }

    @Override
    public ResponseResult<?> getInnerMarketInfo() {
        service.getInnerMarketInfo();
        return ResponseResult.ok();
    }
}
